import useI18n from '@/i18n'

const i18n = useI18n.global

export const statusList = [
    {
        label: i18n.t('mess.config.510061-0'),
        value: 'SUCCESS'
    },
    {
        label: i18n.t('mess.config.510061-1'),
        value: 'FAIL'
    },
    {
        label: i18n.t('mess.config.510061-2'),
        value: 'PROCESS'
    }
] // 状态列表
export const infoStatusList = [
    {
        label: i18n.t('mess.config.510061-3'),
        value: 'SUCCESS'
    },
    {
        label: i18n.t('mess.config.510061-4'),
        value: 'FAIL'
    },
    {
        label: i18n.t('mess.config.510061-5'),
        value: 'INIT'
    }
]

export const itemStyle = {
    marginBottom: 0
}

export const cellStyle = {
    height: '60px',
}

export const searchBaseConfig = []

export const tableBase = [
    {
        label: i18n.t('mess.config.510061-6'),
        width: 180,
        prop: 'startTime'
    },
    {
        label: i18n.t('mess.config.510061-7'),
        minWidth: 120,
        prop: 'name'
    },
    {
        label: i18n.t('mess.config.510061-7-1'),
        width: 170,
        prop: 'number',
        wetherFix: true
    },
    {
        label: i18n.t('mess.config.510061-7-2'),
        width: 160,
        prop: 'successNumber',
        wetherFix: true
    },
    {
        label: i18n.t('mess.config.510061-7-3'),
        width: 170,
        prop: 'failNumber',
        wetherFix: true
    },
    {
        label: i18n.t('mess.config.510061-10'),
        width: 200,
        prop: 'createTime'
    },
    {
        label: i18n.t('mess.config.510061-11'),
        width: 140,
        slotName: 'status'
    },
    {
        label: i18n.t('mess.config.510061-12'),
        width: 140,
        slotName: 'runStatus'
    }
]

export const dialogBaseConfig = [
    {
        label: i18n.t('mess.config.510061-7'),
        type: 'input',
        field: 'tskTaskName',
        rules: [
            {
                required: true,
                message: i18n.t('mess.config.510061-13'),
                trigger: 'blur'
            }
        ],
        otherOptions: {
            placeholder: i18n.t('mess.config.510061-13')
        }
    },
    {
        label: i18n.t('mess.config.510061-14'),
        type: 'customUpload',
        field: 'keyFile',
        rules: [
            {
                required: true,
                message: i18n.t('mess.config.510061-15'),
                trigger: 'blur'
            }
        ],
        otherOptions: {
            fileType: ['txt'],
            btnText: i18n.t('mess.config.510061-16')
        }
    },
    {
        label: i18n.t('mess.config.510061-17'),
        type: 'customUpload',
        field: 'valueFile',
        rules: [
            {
                required: true,
                message: i18n.t('mess.config.510061-18'),
                trigger: 'blur'
            }
        ],
        otherOptions: {
            fileType: ['txt'],
            btnText: i18n.t('mess.config.510061-16'),
            fileSize: 1
        }
    },
    {
        label: i18n.t('mess.config.510061-19'),
        type: 'slot',
        slotName: 'remark'
    }
]

export const searchInfoBaseConfig = [
    /*{
        label: '',
        type: 'customNumber',
        field: 'key',
        otherOptions: {
            removeCode: false,
            addCode: false,
            placeholder: '请输入手机号'
        }
    },
    {
        label: '',
        type: 'select',
        field: 'status',
        options: infoStatusList,
        optionsKey: 'label',
        optionsValue: 'value',
        otherOptions: {
            placeholder: '请选择状态',
            style: {
                width: '200px'
            }
        }
    }*/
]

export const tableInfoBaseConfig = [
    {
        label: i18n.t('mess.config.510061-20'),
        width: 180,
        slotName: 'key'
    },
    {
        label: i18n.t('mess.config.510061-21'),
        prop: 'value',
        headerSlotName: 'valueHeader',
        style: {
            textAlign: 'left'
        }
    },
    {
        label: i18n.t('mess.config.510061-22'),
        slotName: 'status',
        width: 60
    },
    {
        label: i18n.t('mess.config.510061-23'),
        width: 170,
        align: 'left',
        prop: 'sendTime'
    }
]